﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace ProjectStudy
{
    public partial class Dictionary字典 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Dictionary<string, string> dic = new Dictionary<string, string>();
                dic.Add("zhang", "张三");
                dic.Add("li", "李四");
                StringBuilder sb = new StringBuilder();

                foreach (KeyValuePair<string, string> kvp in dic)
                {
                    sb.Append(kvp.Value+"<br/>");
                }

                Label1.Text = sb.ToString();
            }
        }
    }
}